package test1;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class MyServer {
    public static void main(String[] args){
        MyServer ms=new MyServer();
    }
    public  MyServer(){
        try{
            ServerSocket ss=new ServerSocket(9999);
            Socket s=ss.accept();
            System.out.println("1");
            InputStreamReader isr=new InputStreamReader(s.getInputStream());
            BufferedReader br=new BufferedReader(isr);
            String info=br.readLine();
            System.out.println(info);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
